#ifndef FILEREADER_HPP
#define FILEREADER_HPP

#include "wx/wxprec.h"	//precompiled things

#ifndef WX_PRECOMP		//in case no precompiled things
	#include "wx/wx.h"
#endif //WX_PRECOMP

#include "filename.hpp"

#include <fstream>
#include <string>
#include <vector>

#define ASTEROID_TBL	 1
#define FIREBALL_TBL	 2
#define LIGHTNING_TBL	 3
#define NEBULA_TBL		 4
#define SDF_TBL			 5
#define SHIPS_TBL		 6
#define STARS_TBL		 7
#define WEAPONS_TBL		 8
#define MISSION			 9
#define MODEL			10
#define CONFIG			11
#define MFLASH_TBL		12

class FileReader
{
protected:
	std::ifstream DaFile;
	wxString DaFileName;
	int DaFileType;

	//std::vector <wxString> getConfgMaps (); No maps specified here
	std::vector <wxString> getConfgFX	();
	//std::vector <wxString> getAstTbMaps (); AFAIK no maps specified in asteroid.tbl
	std::vector <wxString> getAstTbFX	();
	//std::vector <wxString> getFblTbMaps (); No maps specified in fireball.tbl
	std::vector <wxString> getFblTbFX	();
	//std::vector <wxString> getLgtTbMaps (); No maps specified here
	std::vector <wxString> getLgtTbFX	();
	//std::vector <wxString> getMflTbMaps (); No maps specified here
	std::vector <wxString> getMflTbFX	();
	//std::vector <wxString> getMissnMaps (); syntax identical to ships tables
	//std::vector <wxString> getMissnFX   (); AFAIK no effect files specified in missions
	std::vector <wxString> getModelMaps	();
	std::vector <wxString> getModelFX	();
	//std::vector <wxString> getNebTbMaps (); No maps specified here
	std::vector <wxString> getNebTbFX	();
	std::vector <wxString> getSdfTbMaps	();
	std::vector <wxString> getSdfTbFX	();
	std::vector <wxString> getShpTbMaps	();
	std::vector <wxString> getShpTbFX	();
	//std::vector <wxString> getStrTbMaps (); files here go in effects, maps is only for model textures
	std::vector <wxString> getStrTbFX	();
	//std::vector <wxString> getWepTbMaps (); AFAIK no maps specified here
	std::vector <wxString> getWepTbFX	();

	//wxString returnExt (wxString wx_ext_in);
	void resetFR();

public:
	FileReader();

	bool openFile (Filename name_in);
	void closeFile ();

	std::vector <wxString> getMaps();
	std::vector <wxString> getFX  ();

};

#endif //FILEREADER_HPP